// 防抖
export default function (func, delay = 100) {
    let timeBar = null;
    return function (...e) {
        var context = this;
        if (timeBar) clearTimeout(timeBar)
        timeBar = setTimeout(() => {
            func.apply(context, e);
        }, delay)
    }
}